<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/web/head.jsp"%>
<title>审稿网管理系统</title>
</head>
<body>
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo layui-hide-xs layui-bg-black">审稿网管理</div>
			<!-- 头部区域（可配合layui 已有的水平导航） -->
			<ul class="layui-nav layui-layout-left">
				<!-- 移动端显示 -->
				<li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm"
					lay-header-event="menuLeft"><i
					class="layui-icon layui-icon-spread-left"></i></li>
			</ul>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item layui-hide layui-show-md-inline-block">
					<a href="javascript:;"> <img
						src="/image/admin.jpg"
						class="layui-nav-img"> 管理员[${user.nickName}]
				</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="javascript:updata();">修改昵称</a>
						</dd>
						<dd>
							<a href="javascript:logout();">退出</a>
						</dd>
					</dl>
				</li>
			</ul>
		</div>

		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree" lay-filter="test">
					<li class="layui-nav-item layui-nav-itemed"><a class=""
						href="javascript:;">成员信息管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;" data-url="/web/manager/writerInfo.jsp"
									class="zhuohan">投稿人信息管理</a>
							</dd>
							<dd>
								<a href="javascript:;" data-url="/web/manager/editorInfo.jsp"
									class="zhuohan">审稿人信息管理</a>
							</dd>
						</dl></li>
					<li class="layui-nav-item"><a href="javascript:;">稿件信息管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;" class="zhuohan"
									data-url="/web/manager/articleInfo.jsp">稿件信息</a>
							</dd>
						</dl></li>
					<li class="layui-nav-item"><a href="javascript:;" class="zhuohan"
									data-url="/web/manager/pay.jsp">缴费管理</a></li>
				</ul>
			</div>
		</div>

		<div class="layui-body">
			<!-- 内容主体区域 -->
			<iframe name="frame" width="99%" height="99%"></iframe>
		</div>

		<div class="layui-footer">
			<!-- 底部固定区域 -->
			@ juzhuohan Ajax implementation the first project
		</div>

	</div>
	<script type="text/javascript">
	
		$('.zhuohan').click(function() {
			window.open(base.app + $(this).data("url"), "frame")
		})

		$('.zhuohan:first').click();

		function logout() {
			layer.confirm("您确定要退出账号吗?", {
				title : false,
				closeBtn : 0
			}, function() {
				goUrl('/ManagerServlet?action=logout')
			})
		}
		
		function updata() {
			layer.prompt({
				title : '修改昵称',
			}, function(value, index, elem) {
				ajax('/ManagerServlet', 'text', {
					nickName:value,
					account:'${user.account}',
					action:'updata'
				}, function(res){
					if(res=="success"){
						layer.msg("修改成功", {
						time : 1000,
						icon : 6
					}, location.reload())
					}else{
						layer.msg('修改失败',{time:1000},frameClose)
					}
				})
				layer.close(index);
			});
		}
	</script>
</body>
</html>